﻿using System;

namespace EmbeddedSharp.Core.Function.Flow {

    /// <summary>
    /// 
    /// </summary>
    public class ReturnNode : FuncNode {

        public ReturnNode()
            : base() {
            base.Value = "ret";
        }

        public override object Evaluate() {
            string result = Parameters[0].Evaluate().ToString();

            throw new ReturnException(result);
        }
    }
}
